<?php
$App =  Blyn::app()->getActiveApp();
$InfoList = $App->getEventList();
?>
<div style="font-family: 微软雅黑; font-size: 14px; line-height: 28px">
 <?php $i=0; ?> 
 <?php foreach ($InfoList as $id => $event){ ?>
    <?php
        $eventDetal = new BWEvent($id);
        $group= $event->getGroup(array('parent'=>  BWEventGroup::Event_TYPE_Promotion));
       if($group!=FALSE&&$group->getName()=='品牌优惠')
        { $i=1; ?>
        <?php $eventPic = $eventDetal->getMediaManager()->getMedia('image')->getContent(); ?>
    <div style="border: 1px solid #dedede; padding: 8px 8px; background-color: white; margin: 10px;">
        <div style="text-align: center;margin-bottom: 4px;padding:0 1px;">
           <img src="<?php echo Yii::app()->request->baseUrl.$eventPic; ?>" style="width:100%; height:130px;"/>
        </div>
        <div style="padding: 0;">
            <div style="font-weight: bold; color:blueviolet;"><?php echo $event->name; ?></div>
            <div style="font-weight: bold; color:#dedede;"><?php echo $control->getLink('查看活动详情',array('eventID' => $id)); ?></div>
        </div>
    </div>
        <?php }?>
<?php } ?>
    <?php 
        if($i==0){
            echo "暂时没有品牌优惠活动！";
        }
    ?>
</div>
